<!doctype html>


<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>DependentResultImpl_ (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
     var _typeTreeName = "goog";
     var _fileTreeName = "Source";
  </script>

  <script src="static/js/doc.js">
  </script>

  <script type="text/javascript" src="//www.google.com/jsapi"></script>
  <script type="text/javascript">
     google.load("visualization", "1", {packages:["orgchart"]});
     var _loadingVisualizations = true;
  </script>

  <meta charset="utf8">
</head>

<body onload="grokdoc.onLoad();">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>





<div class="colmask rightmenu">
<div class="colleft">
    <div class="col1">
      <!-- Column 1 start -->

<div id="title">
        <span class="fn">result.DependentResultImpl_</span>
        <span>Extends</span>
        <span class="fn-name">
          <a href="class_goog_result_SimpleResult.html">
          goog.result.SimpleResult
</a>
        </span>
</div>

<div class="g-section g-tpl-75-25">
  <div class="g-unit g-first" id="description">
    A DependentResult represents a Result whose eventual value depends on the
value of one or more other Results. For example, the Result returned by

  </div>


        <div class="g-unit" id="useful-links">
          <div class="title">Useful links</div>
          <ol>
            <li><a href="goog.result.chain or @see goog.result.combine is dependent on the
Results given as arguments.">Also See:</a></li>
            <li><a href="local_closure_goog_result_resultutil.js.source.html"><span class='source-code-link'>Source Code</span></a></li>
            <li><a href="http://code.google.com/p/closure-library/source/browse/local/closure/goog/result/resultutil.js">Git</a></li>
          </ol>
        </div>
</div>






<h2 class="g-first">Inheritance</h2>
<div class='gviz-org-chart-container goog-inline-block'>
<table class='gviz-org-chart' style='display:none'>
  <tr><td><span class="type"><a href="class_goog_result_SimpleResult.html">goog.result.SimpleResult</a></span></td><td></td></tr>
  <tr><td>goog.result.DependentResultImpl_</td><td><span class="type"><a href="class_goog_result_SimpleResult.html">goog.result.SimpleResult</a></span></td></tr>
</table>
</div>
<div class='gviz-org-chart-container goog-inline-block'>
<table class='gviz-org-chart' style='display:none'>
</table>
</div>




  <h2>Constructor</h2>
      <div class="fn-constructor">
    goog.result.DependentResultImpl_(<span><span class="arg">parentResults</span></span>)
  </div>

   <h3>Parameters</h3>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">parentResults</span>
        : <span>!</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span>.&lt;<span>!</span><span class="type"><a href="interface_goog_result_Result.html">goog.result.Result</a></span>&gt;
        <div class="entryOverview">A list of Results that
    will affect the eventual value of this Result.</div>
     </td>
   </tr>
  </table>


<h2>Instance Methods</h2>


  <div class="legend">
        <span class="key publickey"></span><span>Public</span>
        <span class="key protectedkey"></span><span>Protected</span>
        <span class="key privatekey"></span><span>Private</span>
  </div>







<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_result_DependentResultImpl_.html">
              goog.result.DependentResultImpl_
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.result.DependentResultImpl_.prototype.addParentResult"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">addParentResult<span class="args">(<span class="arg">parentResult</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Adds a Result to the list of Results that affect this one.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">parentResult</span>
        : <span>!</span><span class="type"><a href="interface_goog_result_Result.html">goog.result.Result</a></span>
        <div class="entryOverview">A result whose value affects the
    value of this Result.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_result_resultutil.js.source.html#line547">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.result.DependentResultImpl_.prototype.getParentResults"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getParentResults<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_result_resultutil.js.source.html#line554">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>

<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_result_SimpleResult.html">
              goog.result.SimpleResult
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry private">
       <td class="access"></td>






  <td>
    <a name="goog.result.SimpleResult.prototype.callHandlers_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">callHandlers_<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       Calls the handlers registered for this Result.


     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_result_simpleresult.js.source.html#line184">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.result.SimpleResult.prototype.cancel"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">cancel<span class="args">()</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>
      </div>


     <div class="entryOverview">
       Cancels the Result.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>&nbsp;
            Whether the result was canceled. It will not be canceled if
   the result was already canceled or has already resolved.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_result_simpleresult.js.source.html#line210">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.result.SimpleResult.prototype.getError"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getError<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_result_simpleresult.js.source.html#line118">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.result.SimpleResult.prototype.getState"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getState<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_result_simpleresult.js.source.html#line106">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.result.SimpleResult.prototype.getValue"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getValue<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_result_simpleresult.js.source.html#line112">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.result.SimpleResult.prototype.isCanceled"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">isCanceled<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_result_simpleresult.js.source.html#line221">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>






  <td>
    <a name="goog.result.SimpleResult.prototype.isPending_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">isPending_<span class="args">()</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>&nbsp;
            Whether the Result is pending.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_result_simpleresult.js.source.html#line198">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.result.SimpleResult.prototype.setError"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">setError<span class="args">(<span class="arg">opt_error</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Sets the Result to be an error Result.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">opt_error</span>
        : <span class="type">*=</span>
        <div class="entryOverview">Optional error slug to set for this Result.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_result_simpleresult.js.source.html#line167">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.result.SimpleResult.prototype.setValue"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">setValue<span class="args">(<span class="arg">value</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Sets the value of this Result, changing the state.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">value</span>
        : <span class="type">*</span>
        <div class="entryOverview">The value to set for this Result.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_result_simpleresult.js.source.html#line150">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.result.SimpleResult.prototype.then"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">then<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_result_simpleresult.js.source.html#line228">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.result.SimpleResult.prototype.wait"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">wait<span class="args">(<span class="arg">handler</span>,&nbsp;<span class="arg">opt_scope</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Attaches handlers to be called when the value of this Result is available.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">handler</span>
        : <span>!</span><span class="type">function(this:T, !goog.result.SimpleResult</span>)
        <div class="entryOverview">The function
    called when the value is available. The function is passed the Result
    object as the only argument.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">opt_scope</span>
        : <span class="type">T=</span>
        <div class="entryOverview">Optional scope for the handler.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_result_simpleresult.js.source.html#line133">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>




<h2>Instance Properties</h2>







<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_result_DependentResultImpl_.html">
              goog.result.DependentResultImpl_
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.result.DependentResultImpl_.prototype.constructor"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">constructor</span>
        : 
     </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_result_resultutil.js.source.html#line530">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>





  <a name="goog.result.DependentResultImpl_.prototype.parentResults_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">parentResults_</span>
        : 
     </div>


     <div class="entryOverview">
       A list of Results that will affect the eventual value of this Result.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_result_resultutil.js.source.html#line537">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>

<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_result_SimpleResult.html">
              goog.result.SimpleResult
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.result.SimpleResult.prototype.error_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">error_</span>
        : 
     </div>


     <div class="entryOverview">
       The error slug for this Result.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_result_simpleresult.js.source.html#line72">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>





  <a name="goog.result.SimpleResult.prototype.handlers_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">handlers_</span>
        : 
     </div>


     <div class="entryOverview">
       The list of handlers to call when this Result is resolved.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_result_simpleresult.js.source.html#line54">Code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.result.SimpleResult.prototype.state_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">state_</span>
        : 
     </div>


     <div class="entryOverview">
       The current state of this Result.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_result_simpleresult.js.source.html#line47">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>





  <a name="goog.result.SimpleResult.prototype.value_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">value_</span>
        : 
     </div>


     <div class="entryOverview">
       The 'value' of this Result.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_result_simpleresult.js.source.html#line65">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>










<div class="section">
  <table class="horiz-rule">


  </table>
</div>



<h2>Static Properties</h2>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.result.DependentResultImpl_.superClass_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.result.DependentResultImpl_.</span><span class="entryName">superClass_</span>
        : 
     </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_result_resultutil.js.source.html#line530">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>









<div class="section">
  <table class="horiz-rule">


  </table>
</div>
      <!-- Column 1 end -->
    </div>

        <div class="col2">
          <!-- Column 2 start -->
          <div class="col2-c">
            <h2 id="ref-head">Package result</h2>
            <div id="localView"></div>
          </div>

          <div class="col2-c">
            <h2 id="ref-head">Package Reference</h2>
            <div id="sideTypeIndex" rootPath="" current="result.DependentResultImpl_"></div>
          </div>
          <!-- Column 2 end -->
        </div>
</div>
</div>

</body>
</html>
